<!DOCTYPE html>
<!--xmlns:th="http://www.thymeleaf.org" thylef提示不过这里要删除会报错-->
<html lang="en"
      xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>博客后台系统登录</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css"
          th:href="@{https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css}">
    <link rel="stylesheet" href="../../static/css/login.css" th:href="@{/css/login.css}"/>
</head>
<body>
<form method="post" action="#" th:action="@{/admin/login}">
    <div class="login">
        <h2>[[#{login.tip}]]</h2>
        <div class="login_box">
            <!-- required就是不能为空 必须在css效果中有很大的作用 -->
            <!-- 可以简写为required -->
            <input type="text" name="username" required /><label>[[#{login.username}]]</label>
        </div>
        <div class="login_box">
            <input type="password" name="password" required="required"/>
            <label>[[#{login.password}]]</label>
        </div>
        <button class="ui fluid large teal submit button">[[#{login.sign}]]</button>
        <div class="ui inline" style="padding-top: 20px">
            <a th:href="@{/admin(l='zh_CN')}" >中文</a>
            <a th:href="@{/admin(l='en_US')}">English</a>
        </div>
        <div class="ui mini negative message" th:unless="${#strings.isEmpty(message)}" th:text="${message}">[[#{login.error}]]</div>
    </div>
</form>
</body>
</html>